<template slot="search">
  <div>
    <el-form-item label="商品名称">
      <el-input
        size="mini"
        :clearable="true"
        v-model="params.goodName"
        placeholder="商品名称"
      ></el-input>
    </el-form-item>

    <el-form-item label="商品类型">
      <el-select size="mini" v-model="params.typeNo" placeholder="请选择">
        <el-option
          v-for="item in goodsTypes"
          :key="item.typeNo"
          :label="item.name"
          :value="item.typeNo">
        </el-option>
      </el-select>
    </el-form-item>
  </div>
</template>
<script>
export default {
  data() {
    return {
      params: {
        goodName: "",
        typeNo: ""
      },
      goodsTypes:[{
        name:'全部',
        typeNo:'',
      }]
    };
  }
  , created() {
    this.$get("/goods/goodsType",{}).then(res=>{
        if(res.R){
          res.data.forEach(e=>{
            this.goodsTypes.push(e);
          })
        }
    })
  }
};
</script>
<style scoped>
</style>
